package com.daybyday.day1.day10;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/*
@李子宁
Happy,happy everyday!
冲鸭！
2021/3/24

*/
public class KeyValueDemo {

    public String getKey() {
        return key;
    }

    public KeyValueDemo(String key, Object value) {
        this.key = key;
        this.value = value;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    private String key;
    private Object value;

    @Override
    public String toString() {
        return "{" +
                "key=" + key +
                ", value=" + value +
                '}';
    }

    public static void main(String[] args) {
        KeyValueDemo demo = new KeyValueDemo("hh","shabi");
        System.out.println(demo);
        ArrayList<KeyValueDemo> list = new ArrayList<>();
        list.add(demo);
        System.out.println(list);
        Map<String,Object> map = new HashMap<>();
        map.put("hhe","ssss");
        map.put("demolist",list);
        map.put("demo",demo);System.out.println(map);
        List<Map<String,Object>> list1 = new ArrayList<>();
        list1.add(map);
        System.out.println(list1);
        System.out.println(System.currentTimeMillis());

    }
}
